home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
EDITOR
/
AMAC44.ARJ
/
RFR002.QM
< prev
next >
Wrap
Text File
|
1992-04-26
|
13KB
|
277 lines
* rfr002.qm
* Switch Case and Captilization Macros
* Written By Tom Hogshead
* [ See RFRMxx.QM For Use ]
* 4/24/92
* Key Subfile Description
* ===== ============== ==============================================
* @(3) Capitalize First Letter of Words in COL Block |chg
* @(4) Capitalize First Letter of Words in CHAR Block |chg
* @(5) Capitalize First Letter of Words in LINE Block |chg
* @(6) Make all Letters in Block LOWER Case
* @(7) Make all Letters in Block UPPER Case
* #(f1) Capitalize Word at Cursor
* #(f2) Capitalize First Letter of Word at Cursor
* #(f4) Un-Capitalize Word at Cursor
* #(f6) Switch Case of First Letter of Word
* #(f3) Switch Case of First Letter of Word, Loose Blocks
* #(f9) Switch Case of First Letter of Word, Short version
* #(f5) Move to First Letter of Word at Cursor
* #(f8) (Short ver of #f5)
* #(f7) Move to First Non-White Character of Current Line
*
* {e:\up\RFRM*}--Return To RFRMxx.QM
*
*-- eoi
* M A C R O S
* ----------------------------------------------------------------------
* @(3) Capitalize First Letter Of All Words In Column Block
* ----------------------------------------------------------------------
* Mark column block, then press @3 to capitalize first letter of every
* Word in block. Unmark when finished if OK. Block MUST be a column
* block, NOT a line or character block, and need not be closed. This
* macro also unconditionally uppercases the first character of the
* block, so be sure the block includes a full first word.
@3 macrobegin
setscreenoff * Remove if not v2.15 *|
AltWordSet * For all words
editfile "NUL" return quit * Quit NUL
GotoBlockBeg jfalse END *|
Editfile Return * Load NUL
Copyblock * Copy Block To NUL
lower * Make block lower case first *|
Unmarkblock
LOOP:
Upper Wordright * Capitalize first letter each word
Jtrue LOOP * Continue until no more words
* ------- Make Column Block of Widest Line (From @6 mis003.qm) -------*
begfile unmarkblock markcolumn
1: endline
2: cursorleft markcolumn cursordown jfalse 4
3: jump 1
4: copy quit * Copy block to scrap/quit Nul
Pasteover * Paste block back where it was
END:
DefaultWordSet
*
* 53 bytes Fri 02-22-1991 16:08:43
* 50 bytes Mon 07-15-1991 07:56:46 (TH @3, changed c:! to NUL, shortened)
* 61 bytes Mon 07-15-1991 20:40:59 (TH @3, added windows)
* 63 bytes Mon 07-15-1991 21:16:49 (TH @3, added altwordset)
* 53 bytes Mon 07-15-1991 22:52:27 (TH @3, removed #255)
* 52 bytes Wed 07-17-1991 11:10:41 (TH @3, removed extra unmarkblock)
* 51 bytes Fri 07-19-1991 00:43:20 (TH @3, removed markcolumn)
* 40 bytes Fri 07-19-1991 14:26:26 (TH @3, removed window shrink)
* 51 bytes Tue 07-23-1991 16:14:27 (TH @3, use weird char to mark Nul)
* 31 bytes Mon 09-16-1991 17:16:45 (TH @3, removed windows/end block marker)
* 32 bytes Tue 04-21-1992 11:28:14 (TH @3, make block lower case first)
* 35 bytes Wed 04-22-1992 15:25:54 (TH @3, end macro if no block marked)
* 36 bytes Fri 04-24-1992 08:48:49 (TH @3, For V2.15)
* 46 bytes Fri 04-24-1992 08:58:58 (TH @3, changed column block marking)
*
*---------------------------------------------------------------
* @(4) Capitalize First Letter Of All Words In Character Block
*---------------------------------------------------------------
* Mark character block, then press @4 to capitalize first letter of
* every word in block. Unmark when finished if OK. Block MUST be a
* character block, NOT a column or line block, and need not be closed.
* This macro also unconditionally uppercases the first character of the
* block, so be sure the block includes a full first word.
@4 macrobegin
setscreenoff * Remove if not v2.15 *|
AltWordSet * For all words
EditFile "NUL" Return Quit * Quit Nul if loaded
GotoBlockBeg jfalse END *|
editfile return * Load NUL
moveblock * Move block to NUL
lower * Make block lower case *|
Unmarkblock
LOOP:
Upper Wordright * Capitalize first letter each word
Jtrue LOOP * Continue until no more words
MarkCharacter Begfile * Mark original block
copy quit * Copy block/quit Nul
Prevwindow * Return to starting file
paste * Paste block back where it was
END: *|
DefaultWordSet * Reset
*
* 39 bytes Fri 07-19-1991 14:29:37 (TH @4)
* 31 bytes Mon 09-16-1991 02:33:50 (TH @4, quit Nul first, removed windows)
* 32 bytes Tue 04-21-1992 11:25:58 (TH @4, make block lower case first)
* 35 bytes Wed 04-22-1992 15:27:17 (TH @4, end macro if no block marked)
* 36 bytes Fri 04-24-1992 08:48:33 (TH @4, for v2.15)
*
*------------------------------------------------------------
* @(5) Capitalize First Letter Of All Words In Line Block
*------------------------------------------------------------
* Mark line block, then press @5 to capitalize first letter of every
* word in block. Unmark when finished if ok. Block must be a line
* block, not a column or character block, and need not be closed.
@5 macrobegin
setscreenoff * Remove if not v2.15 *|
AltWordSet * For all words
EditFile "NUL" Return Quit * Quit Nul if loaded
GotoBlockBeg jfalse END *|
editfile return * Load NUL
moveblock * Move block to NUL
lower * Make block lower case *|
gotoblockend cursordown * Test if last line is blank
jfalse 1 * If not blank, test line on top
delline *ELSE last line is blank, delete it
* Qedit is set to insert block ABOVE
1: Gotoblockbeg Cursorup * Test If Line 1 Blank
Jfalse 2 * If can't cursor up, line 1 not blnk
delline *ELSE line 1 is blank, delete it
* Qedit is set to insert block BELOW
prevfile cursorup nextfile * Move cursor up one line in
* starting file
2: Unmarkblock * Unmark to begin caps
LOOP:
Upper Wordright * Capitalize first letter each word
Jtrue LOOP * Continue until no more words
Markline Begfile * Finish Mark
copy quit * Copy block to scrap/quit Nul
paste * Paste block back where it was
END: *|
DefaultWordSet * Reset
*
* 40 Bytes Fri 07-19-1991 14:25:09 (TH @5)
* 46 bytes Fri 09-20-1991 21:43:07 (TH @5, for all QEdit settings)
* 45 bytes Sun 09-22-1991 09:34:21 (TH @5, shortened)
* 46 bytes Tue 04-21-1992 11:29:13 (TH @5, make block lower case first)
* 49 bytes Wed 04-22-1992 15:28:39 (TH @5, end macro if no block marked)
* 50 bytes Fri 04-24-1992 08:47:59 (TH @5, for v2.15)
*
* -----------------------------------------
* @(6) Make all Letters in Block LOWER Case
* -----------------------------------------
@6 Macrobegin Lower
*
* 5 Bytes Tue 07-16-1991 08:58:48 (TH @6)
*
* -----------------------------------------
* @(7) Make all Letters in Block UPPER Case
* -----------------------------------------
@7 Macrobegin Upper
*
* 5 Bytes Tue 07-16-1991 08:58:48 (TH @7)
*
* ----------------------------------------
* #(f1) Capitalize Word at Cursor
* ----------------------------------------
#f1 macrobegin markword upper unmarkblock WordRight
*
* 7 bytes Mon 08-20-1990 07:17:53
* 8 bytes Sun 09-22-1991 18:14:10 (TH #f1, added wordright)
*
* ----------------------------------------
* #(f2) Capitalize First Letter of Word
* ----------------------------------------
#f2 macrobegin markword lower gotoblockbeg unmarkblock
markcolumn upper unmarkblock wordright
*
* 10 bytes Sun 03-10-1991 16:05:55
* 12 bytes Thu 08-08-1991 16:36:11 (TH #f2, added lower and wordright)
*
* ----------------------------------------
* #(f4) Un-capitalize Word At Cursor
* ----------------------------------------
#f4 Macrobegin Markword Lower Unmarkblock WordRight
*
* 7 Bytes Mon 08-20-1990 07:18:07
* 8 bytes Sun 09-22-1991 18:14:52 (TH #f4, added wordright)
*
* ---------------------------------------------------------------
* #(f3) Switch Case of First Letter of Current or Next Word Then
* Move to Next Word, Blocks are Lost
* ---------------------------------------------------------------
#f3 macrobegin markword gotoblockbeg unmarkblock flip wordright
*
* 11 bytes Sun 10-27-1991 10:10:37 (TH #f3)
* 9 bytes Mon 10-28-1991 09:59:57 (TH #f3)
*
* ---------------------------------------------------------------
* #(f5) Move Cursor to First Letter of Current or Next Word,
* Does Not Stop At EOL, Requires v2.15
* ---------------------------------------------------------------
#f5 macrobegin setscreenoff altwordset
DO: isbegline jfalse a firstnonwhite jump e * cursor was in col 1
a: isendline jfalse b wordright jump e * cursor was at eol
b: splitline wordright isbegline jtrue c
prevposition joinline wordright jump e * cursor was on space
c: prevposition endline jtrue d
joinline wordright wordleft jump e * cursor was in word
d: prevposition joinline jump e * cursor was on first char
e: wordright isendline jtrue END wordleft * if at eol
END: defaultwordset
*
* 57 bytes Mon 10-28-1991 14:04:02 (TH #f5)
*
* ---------------------------------------------------------------
* #(f6) Switch Case of First Letter of Current or Next Word Then
* Move To Next Word, Maintain Blocks Unless Word Is In Block,
* Does Not Stop At EOL, Requires v2.15
* ---------------------------------------------------------------
#f6 macrobegin setscreenoff altwordset
iscursorinblock jfalse DO unmarkblock
DO: isbegline jfalse a firstnonwhite jump e * cursor was in col 1
a: isendline jfalse b wordright jump e * cursor was at eol
b: splitline wordright isbegline jtrue c
prevposition joinline wordright jump e * cursor was on space
c: prevposition endline jtrue d
joinline wordright wordleft jump e * cursor was in word
d: prevposition joinline jump e * cursor was on first char
e: wordright isendline jtrue END wordleft * if at eol
END: Flip wordright defaultwordset
*
* 64 bytes Mon 10-28-1991 14:03:51 (TH #f6)
* aaa "bbb Ccc d
* aaa "bbb ccc d
*
* --------------------------------------------------------------
* #(f7) Move Cursor to First Non-White Character of Current Line
* --------------------------------------------------------------
* This may also be done with QEdit v2.15 using just "FirstNonWhite".
#f7 macrobegin insertline nextpara cursorup delline scrollup
*
* 9 bytes Tue 09-03-1991 18:31:04 (TH #f7)
*
* ---------------------------------------------------------------
* #(f8) Move Cursor to First Letter of Current or Next Word,
* Short version of #f5
* ---------------------------------------------------------------
#f8 macrobegin markword gotoblockbeg unmarkblock
*
* 7 bytes Mon 10-28-1991 11:17:26 (TH #f8)
*
* ---------------------------------------------------------------
* #(f9) Switch Case of First Letter of Current or Next Word Then
* Move to Next Word, Blocks are Retained
* ---------------------------------------------------------------
#f9 macrobegin wordright wordleft flip wordright
*
* 11 bytes Sun 10-27-1991 10:10:37 (TH #f3)
* 9 bytes Mon 10-28-1991 09:59:57 (TH #f3)
* 8 bytes Mon 10-28-1991 15:25:06 (TH #f9)